#include <QCoreApplication>
#include "MessageLogger.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    LoggerController logger;
    logger.attach(new FileLogger("stderr",
                                 FileLogger::E_DEBUG |
                                 FileLogger::E_INFO |
                                 FileLogger::E_WARNING |
                                 FileLogger::E_CRITICAL |
                                 FileLogger::E_FATAL));
    logger.attach(new FileLogger("d:/log2.txt"));
    logger.startLogging();

    qDebug() << "this is a debug message" ;
    qInfo() << "this is a info message";
    qWarning() << "this is a warning message";
    qCritical() << "this is a critical message";

    return a.exec();
}
